package main;

import java.util.HashMap;
import java.util.Map;

import utils.Pair;
import utils.topology.Graph;

public class Instance {

	
	public enum Weight {SHORT,LONG};
	private int numOfVertices = -1;
	private Map<Pair<Integer, Integer>, Weight> edges = null;
	private int optimal = -1;
	
	private Graph graph;
	
	public Instance(int numOfVertices){
		this.numOfVertices = numOfVertices;
		this.edges = new HashMap<Pair<Integer,Integer>, Weight>();
		this.graph = new Graph(numOfVertices);
	}
	
	public int getNumOfVertices(){
		return this.numOfVertices;
	}
	
	public void addEdge(int i, int j, Weight weight){
		Pair<Integer, Integer> p = new Pair<Integer, Integer>(i, j);
		this.edges.put(p, weight);
		this.graph.addEdge(i-1, j-1);
	}
	
	public Map<Pair<Integer, Integer>, Weight> getEdges(){
		return this.edges;
	}
	
	public Graph getGraph(){
		return this.graph;
	}
	
	public void setOptimalSolution(int optimal){
		this.optimal = optimal;
	}
	
	public int getOptimalSolution(){
		return this.optimal;
	}
}